<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>列表 - 爽客网</title>
<%@include file="../common/js.jsp" %>
<%@include file="../common/css.jsp" %>
<script src="js/search.js" type="text/javascript"></script>
<link href="css/list.css" type="text/css" rel="stylesheet" />
<link href="css/pager.css" type="text/css" rel="stylesheet" />
<style>
</style>
</head>
<body>
	<%@include file="../common/header.jsp"%>
	
	<div class="wrap">
    
    	<!-- search-box-->
    	<div class="w980 mg">
        	<div class="com_box">
            	<div class="hotel_s_box">
                	<h1>酒店搜索</h1>
                    <ul class="clearfix">
                    	<li>
                        	<span>选择城市：</span>
                            <input type="text" class="city_input"  size="15" id="s_city" value="${city }"/>
                        </li>
                        <li>
                        	<span>周边景区：</span>
                            <input type="text" class="city_input"  size="30" />
                        </li>
                        <li>
                        	<span>酒店名称：</span>
                            <input type="text" class="city_input"  size="20" id="hotel_name" value="${name }"/>
                        </li>
                        <li>
                        	<span>房价范围：</span>
                            <select id="price_range">
                                    	<option value="0">不限</option>
                                    	<option value="0-200">200元以下</option>
                                    	<option value="200-499">200-499元</option>
                                    	<option value="500-799">500-799元</option>
                                    	<option value="800">800元以上</option>
                            </select>
                        </li>
                        <li class="last">
                        	<input type="button" class="search" value="搜 索" id="hotel_search"/>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- search-box--end-->
        
        <!-- list-content-->
        <div class="w980 mg box_mg">
        	<div class="list_wrap clearfix">
            
            	<!-- left-box-->
            	<div class="left_box">
                	<select class="sel_sort" id="hotel_search_sort">
                          <option value="price_asc">默认排序：价格从低到高</option>
                          <option value="price_desc">价格从高到低</option>
                          <option value="level_asc">星级从低到高</option>
                          <option value="level_desc">星级从高到低</option>
                    </select>
               		<div class="list_box">
                   		<div class="list_title">
                        	相关酒店产品：共有符合条件的酒店 <em>${pageModel.totalRecord }</em> 家
                        </div>
                        <ul class="com_pt_box h_box">
                        <c:forEach items="${pageModel.list }" var="hotel">
                        	<li>
                        		<div class="price_box">
                                    <strong>¥<i>${hotel.minPriceRound }</i>起</strong>
                                    <div class="rel_info">
	                                    <c:if test="${hotel.star>0 }"><span class="star_s3 star_s3_${hotel.star }"></span></c:if>
	                                    <span class="g_star_bg g_star_s1 stars_r_s${hotel.discuss.overall }"></span>
		                                <a href="${c.hyperlink }" target="_blank" class="dp_nums block">${hotel.discuss.comments }条点评</a>
	                                    <a target="_blank" href="hotel.htm?id=${hotel.id }" class="global1_bg check">查看详情</a>
                                    </div>
                            	</div>
                            	<a target="_blank" href="hotel.htm?id=${hotel.id }" class="fl pic"><img style="width: 200px;height: 100px;" src="${hotel.image1 }" class="block" /></a>
                                <div class="r_box">
                                	<a target="_blank" href="hotel.htm?id=${hotel.id }" class="name">${hotel.name }</a>
                                    <p class="intro">${hotel.descText }</p>
                                    <p>酒店地址：<i>${hotel.address }</i></p>
                                </div>
                                <div class="clear"></div>
                            </li>
                        </c:forEach>
                        </ul>
                    </div>
                </div>
                <!-- left-box--end-->
            	
                <!-- right-box-->    
               <%@include file="right.jsp" %>
                <!-- right-box--end-->
                    
            </div>
        </div>
        <!-- list-content--end-->
        <c:if test="${pageModel.totalPage>1 }"><div id="page" class="h_page"></div></c:if>
    </div>
	
	    <!-- foot-->
	    <%@include file="../common/footer.jsp" %>
	    <!-- foot--end-->
<script type="text/javascript">
$(function(){
	$("#page").pager({
    	pagenumber : '${pageModel.currentPage}',
    	pagecount : '${pageModel.totalPage}',
    	buttonClickCallback : function(page) {
    		searchHotel(page);
    	}
    });
	$("#s_city").val('${city}');
	$("#price_range").val('${price}');
	$("#hotel_search_sort").val('${sort}');
});
</script>
</body>
</html>
